package com.geek.spring.bean;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program java-spring
 * @description: java config 配置
 * @author: chanzhugang
 * @create: 2021/04/18 00:17
 */
@Configuration
public class CDPlayerConfig2 {


    @Bean
    public CompactDisc compactDisc() {
        return new CompactDisc();
    }

    @Bean
    public CDPlayer cdPlayer() {
        return new CDPlayer(compactDisc());
    }

    @Bean
    public CDPlayer cdPlayer(CompactDisc compactDisc) {
        return new CDPlayer(compactDisc);
    }
}